1. Technical Field
The present invention relates generally to an improved data processing system and in particular to a method and apparatus for updating display information stored in a buffer in the data processing system. Still more particularly, the present invention provides a method and apparatus for updating color buffer window identifiers when an overlay window identifier is removed.
2. Description of Related Art
Computer graphics concerns the synthesis or display of real or imaginary objects from computer-based models. In computer graphics systems, images are displayed on a display device to a user in two dimensional and three dimensional forms. These images are displayed using pixels. A pixel is short for a picture element. One spot in a rectilinear grid of thousands of such spots that are individually xe2x80x9cpaintedxe2x80x9d to form an image produced on the screen by a computer or on paper by a printer. A pixel is the smallest element that display or print hardware and software can manipulate in creating letters, numbers, or graphics. These pixels and information relating to these pixels are stored in a buffer. The information describing a pixel is identified using a window ID (WID). A WID is used as an index into a window attribute table (WAT). The WAT contains information describing how a pixel will be displayed on the screen. For example, a WAT identifies depth, color map, buffer, and gamma for a pixel.
Typically, the WID is drawn into a separate buffer, which is used to describe how the pixels in the frame buffer or buffers will be rastered. Some graphic systems, such as, for example, UNIX servers, use overlays to enhance the performance of three dimensional applications, which need to be overlaid on top of a three dimensional application. An example of such is a menu. These type of servers typically require a separate WID buffer for the color planes and overlays to allow for the WIDs to be saved and restored. In FIG. 1A, an example of data in a portion of a WID color buffer is illustrated. FIG. 1B is an example of data in a portion of a WID overlay buffer. In these two examples, each of the numbers illustrates a WID, which is used as an index into a WAT to identify information used to display a pixel associated with the WID. The WIDs illustrated in FIGS. 1A and 1B are those prior to the removal of an overlay WID region. A xe2x80x9c0xe2x80x9d in the WID overlay buffer indicates that the overlay has been disabled.
In FIG. 2A, section 200 illustrates WIDs in a portion of a WID color buffer after an overlay WID region has been removed. The color WID buffer is unaffected. Similarly, section 202 in FIG. 2B illustrates WIDs in a WID overlay buffer after an overlay WID region has been removed from the WID buffer. This region is updated with the disabled overlay WID 0 so the color buffer can be seen on the screen.
Typically, an eight bit split WID may be identified in hardware in which three bits are used to identify the WID for the overlay buffer and in which five bits are used to identify the WID for the color buffer. For example, the first three bits are used as an index into an overlay WAT while the lower five bits are used as an index into a color WAT. With three bits, eight WID entries may be identified or assigned to a pixel using the WID overlay buffer. Thirty-two different WID entries may be assigned to pixels using the WID color buffer. In this manner, WIDs in the color buffer do not need to be updated since the color WID buffer was not overwritten by the overlay WID buffer. In FIG. 3, an example of WIDs that would be used to display pixels on a screen is shown using WIDs from a WID color buffer and a WID overlay buffer. Each of the WIDs identifies what pixels and from what buffer the pixels will be retrieved for display. Section 300 illustrates the restored region.
In manufacturing graphics chips, it is cheaper to fabricate a graphics chip without split WIDs. In such a case, only one WID buffer and two frame buffers are required. With this type of configuration, a means to restore the color buffer WIDs is absent.
Therefore, it would be advantageous to have an improved method and apparatus supporting updating of color buffer WIDs when an overlay WID is removed.
The present invention provides a method and apparatus in a data processing system for updating a buffer containing display information used to display pixels from a first layer and a second layer on a display in the data processing system. Display information is identified for pixels in the first layer in a region corresponding to a removal of pixels being displayed in the second layer. This identification is performed using a data structure containing display information for displaying pixels in the first layer and pixels in the second layer to form identified display information. Display information in the buffer is updated using identified display information.